package cz.semjob.output.data;

import java.util.ArrayList;
import java.util.List;

public class EnrichmentOutput {

	private List<CandidateConcept> candidateConcepts;
	private List<CandidateInstance> candidateInstances;

	public EnrichmentOutput() {
		candidateConcepts = new ArrayList<CandidateConcept>();
		candidateInstances = new ArrayList<CandidateInstance>();
	}

	public void addCandidateConcept(CandidateConcept candidateConcept) {
		this.candidateConcepts.add(candidateConcept);
	}

	public void addCandidateInstance(CandidateInstance candidateInstance) {
		this.candidateInstances.add(candidateInstance);
	}

	public List<CandidateConcept> getCandidateConcepts() {
		return candidateConcepts;
	}

	public List<CandidateInstance> getCandidateInstances() {
		return candidateInstances;
	}

	public String print() {
		StringBuilder sb = new StringBuilder("==Enrichment Output==");
		for (CandidateConcept candidateConcept : candidateConcepts) {
			sb.append(candidateConcept.getEntity().getName() + " : " + candidateConcept.getRepresentation() + " ("
					+ candidateConcept.getOccurences() + ") : parent "
					+ candidateConcept.getParentConcepts().size()
					+ ",  subconcepts "
					+ candidateConcept.getSubConcepts().size() + "\n");
		}
		// TODO instances
		return sb.toString();
	}

}
